package com.xc.freeapp.common;

import com.github.miemiedev.mybatis.paginator.domain.PageList;

public class Page {
	private int pageNo; // 当前页码
	private int pageSize; // 每页行数
	private int totalRecord; // 总记录数
	private int totalPage;
	public int getPageNo() {
		return pageNo;
	}
	public void setPageNo(int pageNo) {
		this.pageNo = pageNo;
	}
	public int getPageSize() {
		return pageSize;
	}
	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}
	public int getTotalRecord() {
		return totalRecord;
	}
	public void setTotalRecord(int totalRecord) {
		this.totalRecord = totalRecord;
	}
	public int getTotalPage() {
		return totalPage;
	}
	public void setTotalPage(int totalPage) {
		this.totalPage = totalPage;
	}
	public Page(int pageNo, int pageSize, int totalRecord, int totalPage) {
		super();
		this.pageNo = pageNo;
		this.pageSize = pageSize;
		this.totalRecord = totalRecord;
		this.totalPage = totalPage;
	}
	public Page() {
		super();
		// TODO Auto-generated constructor stub
	}
	public Page(PageList pagelist){
		super();
		this.pageNo = pagelist.getPaginator().getPage();
		this.pageSize = pagelist.getPaginator().getLimit();
		this.totalRecord = pagelist.getPaginator().getTotalCount();
		this.totalPage =  pagelist.getPaginator().getTotalPages();
		
	}
	

}
